import request from './request.js';
let service = request.service;
let download = request.download;
export default {
    /*耗材管理-机器基本信息列表*/
    getHcMachine(data) {
        return service({
            url: `/adscm/operation/nhcMachine/select`,
            method: 'post',
            data
        })
    },
   /*耗材管理-机器基本信息新增修改*/
    insertUpdateHcmachine(type,data){
        return service({
            url: `/adscm/operation/nhcMachine/${type}`,
            method: 'post',
            data
        })
    },
    /* 根据二维码查询设备信息 */
    getHcMachineByCode(data) {
       return service({
           url: `/adscm/operation/nhcMachine/selectByCode`,
           method: 'post',
           data
       })
    },

    /**原料入库-列表*/
    getHcMaterial(data) {
        return service({
            url: `/adscm/operation/nhcMaterial/select`,
            method: 'post',
            data
        })
    },
    /**原料入库-新增修改*/
    insertUpdateHcMaterial(type, data) {
        return service({
            url: `/adscm/operation/nhcMaterial/${type}`,
            method: 'post',
            data
        })
    },
    getHcMaterialByCode(data) {
        return service({
            url: `/adscm/operation/nhcMaterial/selectByCode`,
            method: 'post',
            data
        })
    },
    /* 新增出库信息 */
    insertHcMaterialDetail(data) {
        return service({
            url: `/adscm/operation/nhcMaterialDetail/insert`,
            method: 'post',
            data
        })
    },
    /* 修改出库信息 */
    updateHcMaterialDetail(data) {
        return service({
            url: `/adscm/operation/nhcMaterialDetail/update`,
            method: 'post',
            data
        })
    },
    getHcMaterialDetailByPid(data) {
        return service({
            url: `/adscm/operation/nhcMaterialDetail/selectByPid`,
            method: 'post',
            data
        })
    },
    getMaxCode() {
        return service({
            url: `/adscm/operation/nhcMaterialDetail/getMaxCode`,
            method: 'get',
        })
    },
    /**工序新增或修改*/
    insertUpdateProcedure(type,data){
        return service({
            url: `/adscm/operation/nhcProcedure/${type}`,
            method: 'post',
            data
        })
    },
    /**工序列表*/
    getProcedureList(data) {
        return service({
            url: `/adscm/operation/nhcProcedure/select`,
            method: 'post',
            data
        })
    }
}
